(0) Obligation:
JBC Problem based on JBC Program:
Manifest-Version: 1.0
Created-By: 1.6.0_26 (Sun Microsystems Inc.)
Main-Class: simple/complInterv/Main
package simple.complInterv;
public class ComplInterv {
public static void loop(int i) {
while (i*i > 9) {
if (i < 0) {
i = i-1;
} else {
i = i+1;
}
}
}
}
package simple.complInterv;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
ComplInterv.loop(args.length);
}
}
(1) JBCNonTerm (EQUIVALENT transformation)
Reached a loop using the following run:
0:
<simple.complInterv.Main.main||0: load ADDR args||args: a34|| ->
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a32
String.CASE_INSENSITIVE_ORDER: o17
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o17!: String$CaseInsensitiveComparator()
a32([java.io.ObjectStreamField|]): length 0
a34([java.lang.String...]): length 4
1:
<simple.complInterv.Main.main||1: arraylength|| - ||a34>
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a32
String.CASE_INSENSITIVE_ORDER: o17
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o17!: String$CaseInsensitiveComparator()
a32([java.io.ObjectStreamField|]): length 0
a34([java.lang.String...]): length 4
2:
<simple.complInterv.Main.main||2: simple.complInterv.ComplInterv.loop(I)V|| - ||4>
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a32
String.CASE_INSENSITIVE_ORDER: o17
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o17!: String$CaseInsensitiveComparator()
a32([java.io.ObjectStreamField|]): length 0
a34([java.lang.String...]): length 4
3:
<simple.complInterv.ComplInterv.loop||0: load INT i||i: 4|| ->
<simple.complInterv.Main.main||2: simple.complInterv.ComplInterv.loop|| - ||4>
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a32
String.CASE_INSENSITIVE_ORDER: o17
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o17!: String$CaseInsensitiveComparator()
a32([java.io.ObjectStreamField|]): length 0
a34([java.lang.String...]): length 4
In the loop head node, references [i15] were interesting.
By SMT, we could prove
((0 <= initial_i15 and 0 <= initial_i1) and (((path1_i22 = (path1_i15 * path1_i15) and path1_i22 = path1_i26 and path1_i28 = (path1_i15 + 1) and path1_i28 = res_i15 and path1_i1 = res_i1 and path1_i15 = initial_i15 and path1_i1 = initial_i1) and (path1_i26 > 9 and path1_i15 >= 0)) and ((res_i22 = (res_i15 * res_i15) and res_i22 = res_i26 and res_i28 = (res_i15 + 1)) and !(res_i26 > 9 and res_i15 >= 0))))
to be UNSAT. Consequently, the loop will not terminate.